package com.hengpeng.itfin.job;

import com.hengpeng.common.cis.ComponentContextLoader;
import com.hengpeng.common.scheduling.AbstractJob;
import com.hengpeng.common.scheduling.ScheduleConfig;
import com.hengpeng.itfin.service.BorrowService;

public class BorrowEndJob extends AbstractJob
{
	@Override
	public void exec(boolean isTimeout, ScheduleConfig config)
	{
		log.info("标的放款流标状态修改任务开始执行");
		BorrowService service = ComponentContextLoader.getBean(BorrowService.class);
		try
		{
			service.borrowLoanEnd();
		}
		catch (Exception e)
		{
			log.info("执行放款结束异常", e);
		}
		try
		{
			service.borrowLossEnd();
		}
		catch (Exception e)
		{
			log.info("执行流标结束异常", e);
		}
		log.info("标的放款流标状态修改任务结束执行");
	}
}
